package com.yonyou.cyxdms.sysAuth.service.dto.dealer;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;

import java.io.Serializable;

/**
 * @author Simon
 */
@ApiModel(description = "返回结果")
public class ResponseDTO<T> implements Serializable {


    @ApiModelProperty(value = "true表示成功，false表示失败")
    private String isResult;


    @ApiModelProperty(value = "处理结果信息")
    private String isMessage;


    public static ResponseDTO fail() {
        ResponseDTO responseDTO = new ResponseDTO();
        responseDTO.setIsResult("false");
        responseDTO.setIsMessage("同步失败");
        return responseDTO;
    }

    public static ResponseDTO fail(String msg) {
        ResponseDTO responseDTO = new ResponseDTO();
        responseDTO.setIsResult("false");
        responseDTO.setIsMessage(msg);
        return responseDTO;
    }

    public static ResponseDTO success() {
        ResponseDTO responseDTO = new ResponseDTO();
        responseDTO.setIsResult("true");
        responseDTO.setIsMessage("同步成功");
        return responseDTO;
    }

    public String getIsResult() {
        return isResult;
    }

    public void setIsResult(String isResult) {
        this.isResult = isResult;
    }

    public String getIsMessage() {
        return isMessage;
    }

    public void setIsMessage(String isMessage) {
        this.isMessage = isMessage;
    }
}
